Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

UNQUOTE1(cons1(X, Z)) → FCONS(unquote(X), unquote1(Z))
QUOTE1(n__cons(X, Z)) → ACTIVATE(X)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
UNQUOTE(01) → 01
UNQUOTE1(cons1(X, Z)) → UNQUOTE(X)
FIRST(0, Z) → NIL
FIRST1(s(X), cons(Y, Z)) → FIRST1(X, activate(Z))
QUOTE1(n__first(X, Z)) → FIRST1(activate(X), activate(Z))
ACTIVATE(n__s(X)) → ACTIVATE(X)
QUOTE1(n__cons(X, Z)) → QUOTE(activate(X))
QUOTE(n__sel(X, Z)) → ACTIVATE(X)
UNQUOTE(s1(X)) → UNQUOTE(X)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL1(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__0) → 01
FIRST(s(X), cons(Y, Z)) → CONS(Y, n__first(X, activate(Z)))
QUOTE(n__sel(X, Z)) → SEL1(activate(X), activate(Z))
FROM(X) → CONS(X, n__from(n__s(X)))
ACTIVATE(n__sel(X1, X2)) → SEL(activate(X1), activate(X2))
ACTIVATE(n__from(X)) → FROM(activate(X))
UNQUOTE1(cons1(X, Z)) → UNQUOTE1(Z)
SEL1(s(X), cons(Y, Z)) → SEL1(X, activate(Z))
SEL1(0, cons(X, Z)) → QUOTE(X)
QUOTE1(n__first(X, Z)) → ACTIVATE(X)
QUOTE1(n__cons(X, Z)) → QUOTE1(activate(Z))
QUOTE(n__s(X)) → QUOTE(activate(X))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
ACTIVATE(n__nil) → NIL
ACTIVATE(n__s(X)) → S(activate(X))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__cons(X1, X2)) → CONS(activate(X1), X2)
QUOTE1(n__cons(X, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
UNQUOTE(s1(X)) → S(unquote(X))
FIRST1(s(X), cons(Y, Z)) → ACTIVATE(Z)
QUOTE(n__s(X)) → ACTIVATE(X)
FIRST1(s(X), cons(Y, Z)) → QUOTE(Y)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
UNQUOTE1(nil1) → NIL
QUOTE(n__sel(X, Z)) → ACTIVATE(Z)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SEL(s(X), cons(Y, Z)) → SEL(X, activate(Z))
QUOTE1(n__first(X, Z)) → ACTIVATE(Z)
FCONS(X, Z) → CONS(X, Z)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

UNQUOTE1(cons1(X, Z)) → FCONS(unquote(X), unquote1(Z))
QUOTE1(n__cons(X, Z)) → ACTIVATE(X)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
UNQUOTE(01) → 01
UNQUOTE1(cons1(X, Z)) → UNQUOTE(X)
FIRST(0, Z) → NIL
FIRST1(s(X), cons(Y, Z)) → FIRST1(X, activate(Z))
QUOTE1(n__first(X, Z)) → FIRST1(activate(X), activate(Z))
ACTIVATE(n__s(X)) → ACTIVATE(X)
QUOTE1(n__cons(X, Z)) → QUOTE(activate(X))
QUOTE(n__sel(X, Z)) → ACTIVATE(X)
UNQUOTE(s1(X)) → UNQUOTE(X)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL1(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__0) → 01
FIRST(s(X), cons(Y, Z)) → CONS(Y, n__first(X, activate(Z)))
QUOTE(n__sel(X, Z)) → SEL1(activate(X), activate(Z))
FROM(X) → CONS(X, n__from(n__s(X)))
ACTIVATE(n__sel(X1, X2)) → SEL(activate(X1), activate(X2))
ACTIVATE(n__from(X)) → FROM(activate(X))
UNQUOTE1(cons1(X, Z)) → UNQUOTE1(Z)
SEL1(s(X), cons(Y, Z)) → SEL1(X, activate(Z))
SEL1(0, cons(X, Z)) → QUOTE(X)
QUOTE1(n__first(X, Z)) → ACTIVATE(X)
QUOTE1(n__cons(X, Z)) → QUOTE1(activate(Z))
QUOTE(n__s(X)) → QUOTE(activate(X))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
ACTIVATE(n__nil) → NIL
ACTIVATE(n__s(X)) → S(activate(X))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__cons(X1, X2)) → CONS(activate(X1), X2)
QUOTE1(n__cons(X, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
UNQUOTE(s1(X)) → S(unquote(X))
FIRST1(s(X), cons(Y, Z)) → ACTIVATE(Z)
QUOTE(n__s(X)) → ACTIVATE(X)
FIRST1(s(X), cons(Y, Z)) → QUOTE(Y)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
UNQUOTE1(nil1) → NIL
QUOTE(n__sel(X, Z)) → ACTIVATE(Z)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SEL(s(X), cons(Y, Z)) → SEL(X, activate(Z))
QUOTE1(n__first(X, Z)) → ACTIVATE(Z)
FCONS(X, Z) → CONS(X, Z)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 6 SCCs with 26 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

UNQUOTE(s1(X)) → UNQUOTE(X)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

UNQUOTE(s1(X)) → UNQUOTE(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

UNQUOTE1(cons1(X, Z)) → UNQUOTE1(Z)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

UNQUOTE1(cons1(X, Z)) → UNQUOTE1(Z)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__sel(X1, X2)) → SEL(activate(X1), activate(X2))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
SEL(s(X), cons(Y, Z)) → SEL(X, activate(Z))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__s(X)) → ACTIVATE(X)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(X1, X2)) → FIRST(activate(X1), activate(X2)) at position [0] we obtained the following new rules:

ACTIVATE(n__first(n__cons(x0, x1), y1)) → FIRST(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__sel(x0, x1), y1)) → FIRST(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__0, y1)) → FIRST(0, activate(y1))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
QDP
                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__cons(x0, x1), y1)) → FIRST(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__0, y1)) → FIRST(0, activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(x0, x1), y1)) → FIRST(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(X1, X2)) → SEL(activate(X1), activate(X2))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SEL(s(X), cons(Y, Z)) → SEL(X, activate(Z))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(X1, X2)) → SEL(activate(X1), activate(X2)) at position [0] we obtained the following new rules:

ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
QDP
                    ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__0, y1)) → FIRST(0, activate(y1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(x0, x1), y1)) → FIRST(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__sel(x0, x1), y1)) → FIRST(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
SEL(s(X), cons(Y, Z)) → SEL(X, activate(Z))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SEL(s(X), cons(Y, Z)) → SEL(X, activate(Z)) at position [1] we obtained the following new rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
QDP
                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(n__0, y1)) → FIRST(0, activate(y1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__cons(x0, x1), y1)) → FIRST(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__sel(x0, x1), y1)) → FIRST(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__cons(x0, x1), y1)) → FIRST(cons(activate(x0), x1), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
QDP
                            ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(n__0, y1)) → FIRST(0, activate(y1))
SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__sel(x0, x1), y1)) → FIRST(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__sel(x0, x1), y1)) → FIRST(sel(activate(x0), activate(x1)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(n__0, y1)) → FIRST(0, activate(y1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__0, y1)) → FIRST(0, activate(y1)) at position [0] we obtained the following new rules:

ACTIVATE(n__first(n__0, y0)) → FIRST(n__0, activate(y0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
QDP
                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__0, y0)) → FIRST(n__0, activate(y0))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
QDP
                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__from(x0), y1)) → FIRST(from(activate(x0)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
QDP
                                            ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__first(x0, x1), y1)) → FIRST(first(activate(x0), activate(x1)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
QDP
                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__s(x0), y1)) → FIRST(s(activate(x0)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
QDP
                                                    ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__nil, y1)) → FIRST(nil, activate(y1)) at position [0] we obtained the following new rules:

ACTIVATE(n__first(n__nil, y0)) → FIRST(n__nil, activate(y0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
QDP
                                                        ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__nil, y0)) → FIRST(n__nil, activate(y0))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
QDP
                                                            ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(x0, y1)) → FIRST(x0, activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
QDP
                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__sel(x0, x1), y1)) → SEL(sel(activate(x0), activate(x1)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
QDP
                                                                    ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__s(x0), y1)) → SEL(s(activate(x0)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
QDP
                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SEL(s(y0), cons(y1, n__0)) → SEL(y0, 0) at position [1] we obtained the following new rules:

SEL(s(y0), cons(y1, n__0)) → SEL(y0, n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
QDP
                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
SEL(s(y0), cons(y1, n__0)) → SEL(y0, n__0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
QDP
                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__0, y1)) → SEL(0, activate(y1)) at position [0] we obtained the following new rules:

ACTIVATE(n__sel(n__0, y0)) → SEL(n__0, activate(y0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
QDP
                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__0, y0)) → SEL(n__0, activate(y0))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
QDP
                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(x0, y1)) → SEL(x0, activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
QDP
                                                                                            ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__nil, y1)) → SEL(nil, activate(y1)) at position [0] we obtained the following new rules:

ACTIVATE(n__sel(n__nil, y0)) → SEL(n__nil, activate(y0))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
QDP
                                                                                                ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__nil, y0)) → SEL(n__nil, activate(y0))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
QDP
                                                                                                    ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__first(x0, x1), y1)) → SEL(first(activate(x0), activate(x1)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
QDP
                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)
ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__cons(x0, x1), y1)) → SEL(cons(activate(x0), x1), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
QDP
                                                                                                            ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule SEL(s(y0), cons(y1, n__nil)) → SEL(y0, nil) at position [1] we obtained the following new rules:

SEL(s(y0), cons(y1, n__nil)) → SEL(y0, n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
QDP
                                                                                                                ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
SEL(s(y0), cons(y1, n__nil)) → SEL(y0, n__nil)
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
QDP
                                                                                                                    ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__from(x0), y1)) → SEL(from(activate(x0)), activate(y1)) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
QDP
                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
QDP
                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__0)) → FIRST(cons(activate(y0), y1), n__0)
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__nil)) → FIRST(cons(activate(y0), y1), n__nil)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil)
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__nil)) → FIRST(sel(activate(y0), activate(y1)), n__nil)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0)
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), n__0)) → FIRST(sel(activate(y0), activate(y1)), n__0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__0)) → FIRST(from(activate(y0)), n__0)
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__nil)) → FIRST(from(activate(y0)), n__nil)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__nil)) → FIRST(first(activate(y0), activate(y1)), n__nil)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__first(y0, y1), n__0)) → FIRST(first(activate(y0), activate(y1)), n__0)
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0)
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__0)) → FIRST(s(activate(y0)), n__0)
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil)
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__nil)) → FIRST(s(activate(y0)), n__nil)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(y0, n__0)) → FIRST(y0, 0) at position [1] we obtained the following new rules:

ACTIVATE(n__first(y0, n__0)) → FIRST(y0, n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__0)) → FIRST(y0, n__0)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, nil) at position [1] we obtained the following new rules:

ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(y0, n__nil)) → FIRST(y0, n__nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__0)) → SEL(sel(activate(y0), activate(y1)), n__0)
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil)
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__nil)) → SEL(sel(activate(y0), activate(y1)), n__nil)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__nil)) → SEL(s(activate(y0)), n__nil)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__0)) → SEL(s(activate(y0)), n__0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil)
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, nil) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__nil)) → SEL(y0, n__nil)
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0)
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(y0, n__0)) → SEL(y0, 0) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(y0, n__0)) → SEL(y0, n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__0)) → SEL(y0, n__0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__0)) → SEL(first(activate(y0), activate(y1)), n__0)
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__nil)) → SEL(first(activate(y0), activate(y1)), n__nil)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__nil)) → SEL(cons(activate(y0), y1), n__nil)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0)
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__0)) → SEL(cons(activate(y0), y1), n__0)
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                                                                        ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0)
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), 0) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), n__0)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                                        ↳ Narrowing
QDP
                                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__0)) → SEL(from(activate(y0)), n__0)
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
QDP
                                                                                                                                                                                                                                                                                                                ↳ Narrowing
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil)
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), nil) at position [1] we obtained the following new rules:

ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), n__nil)



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                                ↳ Narrowing
QDP
                                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__nil)) → SEL(from(activate(y0)), n__nil)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 1 less node.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ Narrowing
              ↳ QDP
                ↳ Narrowing
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ Narrowing
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ Narrowing
                                  ↳ QDP
                                    ↳ DependencyGraphProof
                                      ↳ QDP
                                        ↳ Narrowing
                                          ↳ QDP
                                            ↳ Narrowing
                                              ↳ QDP
                                                ↳ Narrowing
                                                  ↳ QDP
                                                    ↳ Narrowing
                                                      ↳ QDP
                                                        ↳ DependencyGraphProof
                                                          ↳ QDP
                                                            ↳ Narrowing
                                                              ↳ QDP
                                                                ↳ Narrowing
                                                                  ↳ QDP
                                                                    ↳ Narrowing
                                                                      ↳ QDP
                                                                        ↳ Narrowing
                                                                          ↳ QDP
                                                                            ↳ DependencyGraphProof
                                                                              ↳ QDP
                                                                                ↳ Narrowing
                                                                                  ↳ QDP
                                                                                    ↳ DependencyGraphProof
                                                                                      ↳ QDP
                                                                                        ↳ Narrowing
                                                                                          ↳ QDP
                                                                                            ↳ Narrowing
                                                                                              ↳ QDP
                                                                                                ↳ DependencyGraphProof
                                                                                                  ↳ QDP
                                                                                                    ↳ Narrowing
                                                                                                      ↳ QDP
                                                                                                        ↳ Narrowing
                                                                                                          ↳ QDP
                                                                                                            ↳ Narrowing
                                                                                                              ↳ QDP
                                                                                                                ↳ DependencyGraphProof
                                                                                                                  ↳ QDP
                                                                                                                    ↳ Narrowing
                                                                                                                      ↳ QDP
                                                                                                                        ↳ Narrowing
                                                                                                                          ↳ QDP
                                                                                                                            ↳ DependencyGraphProof
                                                                                                                              ↳ QDP
                                                                                                                                ↳ Narrowing
                                                                                                                                  ↳ QDP
                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                      ↳ QDP
                                                                                                                                        ↳ Narrowing
                                                                                                                                          ↳ QDP
                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                              ↳ QDP
                                                                                                                                                ↳ Narrowing
                                                                                                                                                  ↳ QDP
                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                      ↳ QDP
                                                                                                                                                        ↳ Narrowing
                                                                                                                                                          ↳ QDP
                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                              ↳ QDP
                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                  ↳ QDP
                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                      ↳ QDP
                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                          ↳ QDP
                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                                      ↳ QDP
                                                                                                                                                                                                                                                                                                        ↳ Narrowing
                                                                                                                                                                                                                                                                                                          ↳ QDP
                                                                                                                                                                                                                                                                                                            ↳ DependencyGraphProof
                                                                                                                                                                                                                                                                                                              ↳ QDP
                                                                                                                                                                                                                                                                                                                ↳ Narrowing
                                                                                                                                                                                                                                                                                                                  ↳ QDP
                                                                                                                                                                                                                                                                                                                    ↳ DependencyGraphProof
QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVATE(n__first(y0, n__cons(x0, x1))) → FIRST(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, x0)) → FIRST(y0, x0)
SEL(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__from(y0), n__first(x0, x1))) → FIRST(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__from(x0))) → FIRST(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__s(x0))) → SEL(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__first(x0, x1))) → SEL(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), x0)) → SEL(first(activate(y0), activate(y1)), x0)
ACTIVATE(n__sel(n__from(y0), n__cons(x0, x1))) → SEL(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__s(X)) → ACTIVATE(X)
SEL(s(y0), cons(y1, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__sel(n__sel(y0, y1), n__cons(x0, x1))) → SEL(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__first(x0, x1))) → FIRST(cons(activate(y0), y1), first(activate(x0), activate(x1)))
SEL(s(y0), cons(y1, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__first(x0, x1))) → FIRST(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__first(x0, x1))) → SEL(first(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__sel(x0, x1))) → SEL(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__first(x0, x1))) → SEL(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__from(x0))) → SEL(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__s(x0))) → FIRST(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__from(y0), n__from(x0))) → SEL(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(y0, n__first(x0, x1))) → FIRST(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), n__cons(x0, x1))) → FIRST(from(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__sel(y0, y1), n__first(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), first(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__sel(x0, x1))) → FIRST(first(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__cons(y0, y1), n__cons(x0, x1))) → FIRST(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(X1, X2)) → ACTIVATE(X1)
ACTIVATE(n__sel(n__sel(y0, y1), x0)) → SEL(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__first(x0, x1))) → SEL(y0, first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__sel(x0, x1))) → SEL(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__from(x0))) → SEL(sel(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(y0, n__s(x0))) → SEL(y0, s(activate(x0)))
ACTIVATE(n__first(X1, X2)) → ACTIVATE(X2)
ACTIVATE(n__first(n__sel(y0, y1), n__sel(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), x0)) → SEL(cons(activate(y0), y1), x0)
ACTIVATE(n__sel(n__sel(y0, y1), n__sel(x0, x1))) → SEL(sel(activate(y0), activate(y1)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), x0)) → SEL(from(activate(y0)), x0)
ACTIVATE(n__sel(y0, n__sel(x0, x1))) → SEL(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(y0, n__s(x0))) → FIRST(y0, s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__cons(x0, x1))) → FIRST(sel(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__s(y0), n__sel(x0, x1))) → SEL(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__sel(y0, y1), n__s(x0))) → SEL(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__cons(x0, x1))) → SEL(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__from(y0), n__first(x0, x1))) → SEL(from(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__first(y0, y1), n__from(x0))) → SEL(first(activate(y0), activate(y1)), from(activate(x0)))
ACTIVATE(n__sel(n__first(y0, y1), n__cons(x0, x1))) → SEL(first(activate(y0), activate(y1)), cons(activate(x0), x1))
SEL(s(y0), cons(y1, x0)) → SEL(y0, x0)
ACTIVATE(n__sel(n__cons(y0, y1), n__sel(x0, x1))) → SEL(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__s(x0))) → SEL(cons(activate(y0), y1), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), x0)) → SEL(s(activate(y0)), x0)
ACTIVATE(n__first(n__s(y0), n__s(x0))) → FIRST(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), x0)) → FIRST(sel(activate(y0), activate(y1)), x0)
ACTIVATE(n__cons(X1, X2)) → ACTIVATE(X1)
SEL(s(y0), cons(y1, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(n__from(y0), n__from(x0))) → FIRST(from(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__cons(y0, y1), n__sel(x0, x1))) → FIRST(cons(activate(y0), y1), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__from(y0), x0)) → FIRST(from(activate(y0)), x0)
ACTIVATE(n__from(X)) → ACTIVATE(X)
ACTIVATE(n__first(n__cons(y0, y1), n__from(x0))) → FIRST(cons(activate(y0), y1), from(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__cons(x0, x1))) → FIRST(s(activate(y0)), cons(activate(x0), x1))
ACTIVATE(n__first(n__s(y0), x0)) → FIRST(s(activate(y0)), x0)
ACTIVATE(n__first(y0, n__sel(x0, x1))) → FIRST(y0, sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__first(y0, y1), n__s(x0))) → FIRST(first(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__first(x0, x1))) → FIRST(s(activate(y0)), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(y0, n__cons(x0, x1))) → SEL(y0, cons(activate(x0), x1))
ACTIVATE(n__first(y0, n__from(x0))) → FIRST(y0, from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), n__cons(x0, x1))) → FIRST(first(activate(y0), activate(y1)), cons(activate(x0), x1))
ACTIVATE(n__sel(n__s(y0), n__s(x0))) → SEL(s(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__sel(y0, y1), n__s(x0))) → FIRST(sel(activate(y0), activate(y1)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__sel(x0, x1))) → FIRST(s(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__from(y0), n__s(x0))) → SEL(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__sel(n__s(y0), n__from(x0))) → SEL(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__sel(n__cons(y0, y1), n__first(x0, x1))) → SEL(cons(activate(y0), y1), first(activate(x0), activate(x1)))
ACTIVATE(n__sel(n__cons(y0, y1), n__cons(x0, x1))) → SEL(cons(activate(y0), y1), cons(activate(x0), x1))
ACTIVATE(n__sel(y0, n__from(x0))) → SEL(y0, from(activate(x0)))
ACTIVATE(n__first(n__from(y0), n__sel(x0, x1))) → FIRST(from(activate(y0)), sel(activate(x0), activate(x1)))
ACTIVATE(n__first(n__sel(y0, y1), n__from(x0))) → FIRST(sel(activate(y0), activate(y1)), from(activate(x0)))
FIRST(s(X), cons(Y, Z)) → ACTIVATE(Z)
ACTIVATE(n__first(n__cons(y0, y1), x0)) → FIRST(cons(activate(y0), y1), x0)
ACTIVATE(n__first(n__from(y0), n__s(x0))) → FIRST(from(activate(y0)), s(activate(x0)))
ACTIVATE(n__first(n__s(y0), n__from(x0))) → FIRST(s(activate(y0)), from(activate(x0)))
ACTIVATE(n__first(n__first(y0, y1), x0)) → FIRST(first(activate(y0), activate(y1)), x0)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

QUOTE(n__s(X)) → QUOTE(activate(X))
QUOTE(n__sel(X, Z)) → SEL1(activate(X), activate(Z))
SEL1(s(X), cons(Y, Z)) → SEL1(X, activate(Z))
SEL1(0, cons(X, Z)) → QUOTE(X)

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FIRST1(s(X), cons(Y, Z)) → FIRST1(X, activate(Z))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP

Q DP problem:
The TRS P consists of the following rules:

QUOTE1(n__cons(X, Z)) → QUOTE1(activate(Z))

The TRS R consists of the following rules:

sel(s(X), cons(Y, Z)) → sel(X, activate(Z))
sel(0, cons(X, Z)) → X
first(0, Z) → nil
first(s(X), cons(Y, Z)) → cons(Y, n__first(X, activate(Z)))
from(X) → cons(X, n__from(n__s(X)))
sel1(s(X), cons(Y, Z)) → sel1(X, activate(Z))
sel1(0, cons(X, Z)) → quote(X)
first1(0, Z) → nil1
first1(s(X), cons(Y, Z)) → cons1(quote(Y), first1(X, activate(Z)))
quote(n__0) → 01
quote1(n__cons(X, Z)) → cons1(quote(activate(X)), quote1(activate(Z)))
quote1(n__nil) → nil1
quote(n__s(X)) → s1(quote(activate(X)))
quote(n__sel(X, Z)) → sel1(activate(X), activate(Z))
quote1(n__first(X, Z)) → first1(activate(X), activate(Z))
unquote(01) → 0
unquote(s1(X)) → s(unquote(X))
unquote1(nil1) → nil
unquote1(cons1(X, Z)) → fcons(unquote(X), unquote1(Z))
fcons(X, Z) → cons(X, Z)
first(X1, X2) → n__first(X1, X2)
from(X) → n__from(X)
s(X) → n__s(X)
0n__0
cons(X1, X2) → n__cons(X1, X2)
niln__nil
sel(X1, X2) → n__sel(X1, X2)
activate(n__first(X1, X2)) → first(activate(X1), activate(X2))
activate(n__from(X)) → from(activate(X))
activate(n__s(X)) → s(activate(X))
activate(n__0) → 0
activate(n__cons(X1, X2)) → cons(activate(X1), X2)
activate(n__nil) → nil
activate(n__sel(X1, X2)) → sel(activate(X1), activate(X2))
activate(X) → X

Q is empty.
We have to consider all minimal (P,Q,R)-chains.